
/* 通过事件委托来处理动态生成的元素 */
$(document).on('click', '.course-description', () => {
    console.log('123');
    hideAllBox();
    $(".course-description-box").css("display", "block")
    hiddenBottomBorder()
    $(".course-description").addClass("my-border-bottom");

});
$(document).on('click', '.course-content', () => {
    hideAllBox();
    $(".course-content-box").css("display", "block")
    hiddenBottomBorder()

    $(".course-content").addClass("my-border-bottom");

});
$(document).on('click', '.course-remark', () => {
    hideAllBox();
    $(".course-remark-box").css("display", "block")
    hiddenBottomBorder()
    $(".course-remark").addClass("my-border-bottom");
});

function hideAllBox() {
    $(".course-description-box").css("display", "none")
    $(".course-content-box").css("display", "none")
    $(".course-remark-box").css("display", "none")
}
function hiddenBottomBorder() {
    $(".course-description").removeClass("my-border-bottom");
    $(".course-content").removeClass("my-border-bottom");
    $(".course-remark").removeClass("my-border-bottom");
}